//========================================================================================
//  
//  $File: $
//  
//  Owner: lumpchen@gmail.com
//  
//  $Author: $
//  
//  $DateTime: $
//  
//  $Revision: $
//  
//  $Change: $
//  
//  Copyright 1997-2008 Adobe Systems Incorporated. All rights reserved.
//  
//  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance 
//  with the terms of the Adobe license agreement accompanying it.  If you have received
//  this file from a source other than Adobe, then your use, modification, or 
//  distribution of it requires the prior written permission of Adobe.
//  
//========================================================================================

#include "VCPlugInHeaders.h"


// Interface includes:
#include "IBarcode4inSuite.h"

// General includes:
#include "SelectionASBTemplates.tpp"
#include "K2Vector.tpp"

// Project includes:
#include "Barcode4inID.h"


/** Provides the ASB implementation for the plug-ins selection suite.

    
    @ingroup barcode4in
*/
class Barcode4inSuiteASB : public CPMUnknown<IBarcode4inSuite>
{
public:
	/** Constructor.
	@param boss interface ptr from boss object on which this interface is aggregated.
	*/
	Barcode4inSuiteASB(IPMUnknown* boss) : CPMUnknown<IBarcode4inSuite>(boss) {};

	/** Destructor. Does nothing.
	*/
	~Barcode4inSuiteASB() {}

	/** @return kTrue if operation X is supported by any CSBs.*/
	virtual bool16 CanDoX() const;

	/** Performs operation X on each enabled CSB returning an ErrorCode.
	@return kSuccess on success, or an appropriate ErrorCode on failure. */
	virtual ErrorCode DoX() ;

	/** @return kTrue if operation Y is supported all CSB.*/
	virtual bool16 CanDoY() const ;

	/** Performs operation Y on each enabled CSB returning an ErrorCode. 
	@return kSuccess on success, or an appropriate ErrorCode on failure. */
	virtual ErrorCode DoY() const ;

	/** Gets some data from each enabled CSB.  Instead of returning a value,
	implementations will stuff data into the OUT variable.
	@param vector OUT Data Z for the current selection is inserted into vector.*/
	virtual void GetZ( K2Vector<int32> & vector) ;

	/** Sets some data on each enabled CSB.
	@param z IN Data to set.
	@return kSuccess on success, or an appropriate ErrorCode on failure. */
	virtual ErrorCode SetZ( int32 z ) ;
};


/* CREATE_PMINTERFACE
Binds the C++ implementation class onto its ImplementationID 
making the C++ code callable by the application.
*/
CREATE_PMINTERFACE(Barcode4inSuiteASB, kBarcode4inSuiteASBImpl)

// Returns kTrue if any of the CSBs CanDoX.
bool16 Barcode4inSuiteASB::CanDoX() const
{
	return( AnyCSBSupports(make_functor(&IBarcode4inSuite::CanDoX),(this), IID_IBARCODE4INSUITE));
}

//  Create a sequence and call each CSB to process it's commands.
ErrorCode Barcode4inSuiteASB::DoX()
{
	return( Process(make_functor(&IBarcode4inSuite::DoX), this, IID_IBARCODE4INSUITE));
}

// Returns kTrue if all of the CSBs CanDoY
bool16 Barcode4inSuiteASB::CanDoY() const
{
	return( AllCSBSupports(make_functor(&IBarcode4inSuite::CanDoY),(this), IID_IBARCODE4INSUITE));
}

// Create a sequence and call each CSB to process it's commands
ErrorCode Barcode4inSuiteASB::DoY() const
{
	return( Process(make_functor(&IBarcode4inSuite::DoY), this, IID_IBARCODE4INSUITE));	
}

// Call each enabled CSB with an out parameter.
void Barcode4inSuiteASB::GetZ( K2Vector<int32> & vector)
{
	CallEach(make_functor(&IBarcode4inSuite::GetZ, vector), this);
}

// Create a sequence and call each CSB with an in parameter.
ErrorCode Barcode4inSuiteASB::SetZ( int32 z )
{
	return( Process(make_functor(&IBarcode4inSuite::SetZ, z), this, IID_IBARCODE4INSUITE));
}


//  Code generated by DollyXs code generator
